{% extends 'baes.html'%}
{% block style %}
	<style>
		h1{
			
			font-family: '楷体' !important; 
		}
		.mydiv{
			background-color: #eeeeee;
			width: 100vw !important;
			padding-left:20vw !important; 
		}
		th{
			background: #eee;
		}
		.mybutton{
			margin-top:10px;
			margin-right: 10px;
			margin-bottom:10px !important;  
		}
	</style>
{% endblock %}
{% block content %}
<div class="container mydiv">
	<h1>教师管理</h1>
</div>
<div class="container">
	<div class="row clearfix">
		<div class="col-md-12 column">
			
		    <a href="/add/teacher"><button type="button" class="mybutton btn btn-info btn-default glyphicon glyphicon-plus">添加</button></a>
			<div class="table-responsive">
				<table class="table table-hover table-bordered">
					<thead>
						<tr>
							<th class="text-center">
								序号
							</th>
							<th class="text-center">
								名称
							</th>
							<th class="text-center">
								介绍
							</th>
							<th class="text-center">
								职称
							</th>
                            <th class="text-center">
								编辑
							</th>
                            <th class="text-center">
								删除
							</th>
						</tr>
					</thead>
					<tbody class="text-center">
						{% for vid in teachers %}
						<tr>
							
							<td>
								{{vid.id}}
							</td>
							<td>
								{{vid.name}}
							</td>
							<td>
								{{vid.adstract}}
							</td>
							<td>
								{{vid.level}}
							</td>
							<td>
								<a class="glyphicon glyphicon-edit" href="/update_teacher/{{vid.id}}"></a>
							</td>
							<td>
								<a class="glyphicon glyphicon-trash" href="#" onclick="removemodel('{{vid.id}}','{{vid.name}}')"></a>
							</td>
							
						</tr>
						{% endfor %}
					</tbody>
				</table>
			</div>
			
		</div>
	</div>
</div>


<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">确定要删除吗？</h4>
            </div>
            <div class="modal-body">在这里添加一些文本</div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary remove">提交更改</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

{% endblock %}



{% block script %}
<script type="text/javascript" src="/static/teacher.js"></script>
{% endblock %}